package com.yvon.maple.service.msg.core.controller;

import com.yvon.maple.cloud.web.data.ApiController;
import com.yvon.maple.service.msg.core.model.vo.SendDTO;
import com.yvon.maple.service.msg.core.model.vo.SendParam;
import com.yvon.maple.service.msg.core.service.SendService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : Yvon
 * @since : 2021-12-24
 */
@RestController
@RequestMapping("/sends")
@Api(value = "消息发送", tags = "消息服务 - 消息发送API")
public class SendController extends ApiController {

    @Autowired
    private SendService sendService;


    @ApiOperation(value = "发送消息(单条)", notes = "发送消息(单条)")
    @PostMapping(value = "/send")
    public SendDTO send(@RequestBody SendParam msgVo) {
        return sendService.send(msgVo);
    }

}
